<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/12/21
  Time: 下午4:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
    <title>友情链接列表</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            友情链接管理
            <small>友情链接列表</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/link">
                    合作伙伴管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    合作伙伴列表
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区----->
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <div>
                <span class="field-validation-error">${message}</span>
            </div>
            <div class="text-right">
                <a href="${ctx}/link/add" class="btn blue">添加合作伙伴</a>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <table class="table table-striped table-hover zqy-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>标题</th>
                    <th>链接</th>
                    <th>添加时间</th>
                    <th>状态</th>
                    <th></th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="item" items="${list}">
                    <tr>
                        <td>${item.linkId}</td>
                        <td class="infoCol">
                            <div class="imgBox"><img alt="" src="${item.logo}"></div>
                            <div class="productInfo">
                                <a target="_blank" href="">${item.title}</a>
                            </div>
                        </td>
                        <td>${item.url}</td>
                        <td>
                            <fmt:formatDate value="${item.createOn}" pattern="yyyy-MM-dd"/>
                        </td>
                        <td>
                            <c:choose>
                                <c:when test="${item.status==1}">
                                    正常
                                </c:when>
                                <c:otherwise>
                                    禁用
                                </c:otherwise>
                            </c:choose>
                        </td>
                        <td>
                            <a href="${ctx}/link/edit?id=${item.linkId}">编辑</a>
                            <a href="/link/del?id=${item.linkId}" onclick="return confirm('确定要删除该链接吗?');">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <div class="text-center">
                <ul class="pagination">

                </ul>
            </div>

        </div>
    </div>

</div>
<!------[end]内容区----->

</body>
</html>